feat(sync): add Merge Gateway model sync#3249
Conversation
Action items
|
|
@rekram1-node can you take a look when you get a second? |
1d49bd6 to
0ec6a52
Compare
|
Addressed the automated review and cache-pricing follow-up in
Verification: 51 focused tests pass, |
Action items
|
0ec6a52 to
be29539
Compare
be29539 to
31a3612
Compare
|
Fixed the follow-up reviewer finding in |
Action items
|
Action items
|
|
No actionable findings. |
rekram1-node
left a comment
There was a problem hiding this comment.
Action items
-
[medium] [possible mistake]
packages/core/src/sync/providers/merge-gateway.ts:206- Check: Apply the selected vendor route'ssupports_reasoningsignal instead of always preserving resolved reasoning metadata. Why: The earlier reasoning findings corrected current TOMLs, but the sync still ignores the route-specific reasoning fields documented inprovider.toml. If a route later reportssupports_reasoning = false, or selection falls back to a vendor without reasoning,existing.reasoning/existing.reasoning_optionssurvive and the generated model continues advertising unsupported controls. A conservative fix is to emitreasoning = falseand removereasoning_optionswhen the selected route explicitly reports false, while continuing to preserve curated options for supported routes whose exact values are not exposed. Add a regression test for an existing reasoning model whose selected route reports false. -
[medium] [possible mistake]
packages/core/src/sync/providers/merge-gateway.ts:261- Check: Treatprompt_caching.mode = "none"as an explicit no-cache signal. Why: The previous cache-pricing discussion fixed preservation for fields the API omits, butmergeGatewayCachePricingignoresmode; with{ mode: "none" }and no numeric fields, both?? existingfallbacks retain curated cache prices. That publishes cache pricing for a route explicitly reporting no prompt caching. Return undefined read/write prices formode = "none", and add a regression test distinct from the existingmode = "automatic"preservation test.
Action items
|
Summary
GET /v1/modelscatalogbase_modelmetadataprompt_caching/ cache-price fields authoritatively when Merge exposes themdisplay_nameThe initial live sync created 43 model entries, updated 66, and deleted none.
Testing
bun models:sync merge-gateway --dry-runbun test packages/core/test/sync.test.tsbun validategit diff --checkmerge-gateway/openai/gpt-5.6-sol,merge-gateway/anthropic/claude-fable-5,merge-gateway/xai/grok-4.5, etc.Sources
Maintainer setup
The scheduled workflow requires a regular Merge Gateway API key configured as the repository Actions secret
MERGE_GATEWAY_API_KEY. The credential is not included in this PR.